/**
 * @File ModuleStatus.java
 * Date			Author		Changes
 * -------		--------	--------
 * Jul 15, 2011		Vijay Rajan		Created
 * 
 **/
package com.vh.model;

import java.util.Date;

import org.appfuse.model.BaseObject;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.CompareToBuilder;

/**
 * @author Vijay Rajan
 *
 */
public class ModuleStatus extends BaseObject implements Comparable<ModuleStatus> {
	
	Long ModuleId;
	Date startDate;
	Date endDate;
	String type;
	String status;
	
	@Override
	public boolean equals(final Object other) {
		if (!(other instanceof ModuleStatus))
			return false;
		ModuleStatus castOther = (ModuleStatus) other;
		return new EqualsBuilder().append(ModuleId, castOther.ModuleId)
				.append(startDate, castOther.startDate)
				.append(endDate, castOther.endDate)
				.append(type, castOther.type).append(status, castOther.status)
				.isEquals();
	}
	@Override
	public int hashCode() {
		return new HashCodeBuilder().append(ModuleId).append(startDate)
				.append(endDate).append(type).append(status).toHashCode();
	}
	@Override
	public String toString() {
		return new ToStringBuilder(this).append("ModuleId", ModuleId)
				.append("startDate", startDate).append("endDate", endDate)
				.append("type", type).append("status", status).toString();
	}
	public int compareTo(final ModuleStatus other) {
		return new CompareToBuilder().append(ModuleId, other.ModuleId)
				.append(startDate, other.startDate)
				.append(endDate, other.endDate).append(type, other.type)
				.append(status, other.status).toComparison();
	}
	
	
	
}
